package me.zhengjie.modules.quartz.task.processing;

import lombok.extern.slf4j.Slf4j;
import me.zhengjie.modules.sync.processing.PropertyContactSyncProcessing;
import me.zhengjie.modules.sync.processing.PropertyVideoSyncProcessing;
import me.zhengjie.modules.sync.processing.PropertyVrSyncProcessing;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
@Deprecated
public class PropertyRelationProcessingTask {
    @Autowired
    PropertyVrSyncProcessing propertyVrSyncProcessing;

    @Autowired
    PropertyVideoSyncProcessing propertyVideoSyncProcessing;

    @Autowired
    PropertyContactSyncProcessing propertyContactSyncProcessing;

    public void processing(){
        try {
            log.info("propertyVrSyncProcessing run start");
            propertyVrSyncProcessing.run();
            log.info("propertyVrSyncProcessing run end");
        } catch (Exception e) {
            log.error("propertyVrSyncProcessing error", e);
        }

        try {
            log.info("propertyVideoSyncProcessing run start");
            propertyVideoSyncProcessing.run();
            log.info("propertyVideoSyncProcessing run end");
        } catch (Exception e) {
            log.error("propertyVideoSyncProcessing error", e);
        }

        try {
            log.info("propertyContactSyncProcessing run start");
            propertyContactSyncProcessing.run();
            log.info("propertyContactSyncProcessing run end");
        } catch (Exception e) {
            log.error("propertyContactSyncProcessing error", e);
        }
    }
}
